/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.poll.water.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.poll.common.constant.enums.PollSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 水源地保护区
 *
 * @author daijie
 * @date 2023-09-28 15:55:29
 */
@Data
@TableName("poll_water_source_protection_area")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "水源地保护区")
public class PollWaterSourceProtectionAreaEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "id")
    private Long id;

    /**
     * name
     */
    @Schema(description = "name")
    private String name;

    /**
     * 区域类别
     */
    @Schema(description = "区域类别")
    private String type;

    /**
     * 保护等级
     */
    @Schema(description = "保护等级")
    private String protectionLevel;

    /**
     * 是否使用
     */
    @Schema(description = "useFlag")
    private Boolean useFlag;

    /**
     * 定位
     */
    @Schema(description = "定位")
    private String gisLocation;

    /**
     * 范围
     */
    @Schema(description = "范围")
    private String gisScope;

    /**
     * 供水水厂
     */
    @Schema(description = "供水水厂")
    private String waterworks;

    /**
     * 取水口信息
     */
    @Schema(description = "取水口信息")
    private String waterIntake;

    /**
     * 取水口定位
     */
    @Schema(description = "取水口定位")
    private String waterIntakeLocation;

    /**
     * 取水量
     */
    @Schema(description = "取水量")
    private String waterWithdrawal;

    /**
     * 服务人口
     */
    @Schema(description = "服务人口")
    private String servicePopulation;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remarks;

    /**
     * orgId
     */
    @Schema(description = "orgId")
    private Long orgId;

    public String getUseFlagStr() {
        return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getUseFlag());
    }

    public String getTypeStr() {
        return DictResolver.getItemLabelByValue(PollSysDictEnum.water_source_type, this.type);
    }

    public String getProtectionLevelStr() {
        return DictResolver.getItemLabelByValue(PollSysDictEnum.protection_level, this.protectionLevel);
    }
}